home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Source Code ƒ / MPW C ƒ / Func names ƒ / FuncNames.r < prev    next >
Encoding:
Text File  |  1989-01-12  |  2.9 KB  |  119 lines  |  [TEXT/MPS ]

  1. /*
  2.     Count.r - commando resource file
  3.  
  4.     'FuncNames' is a cross-reference utility for 'C' programs.
  5.     It has the ability to handle nested include files
  6.     to a depth of 8 levels and properly processes nested
  7.     comments as supported by BDS C. Option flags support
  8.     the following features:
  9.  
  10.     - Routing of list output to disk
  11.     - Cross-referencing of reserved words
  12.     - Processing of nested include files
  13.     - Generation of listing only
  14.  
  15.     Usage: FuncNames <filename> <flag(s)>
  16.  
  17.     Flags:
  18.     -i                = Enable file inclusion
  19.     -l                = Generate listing only
  20.     -r                = Cross-ref reserved words
  21.     -f                = do function index only
  22.     -o <filename>    = Write output to named file
  23.     -w <width>        = No of output columns
  24.     -t <number>        = Number of spaces to expand each tab
  25.  
  26.     Note that flags -o -w -t must be followed by a space
  27.     and then the value for the flag.
  28. */
  29.  
  30. #include    "Cmdo.r"
  31.  
  32.  
  33. resource 'cmdo' (128) {
  34.     {
  35.         280,            /* Height of dialog */
  36.         "Lists C Function names from its input, and writes the results to standard output.  "
  37.         "Also will cross-reference all functions and variables, though "
  38.         "its symbol table is currently limited to 749 symbols.  Tool by Scott Boag.",
  39.         {
  40.             and  {{-5,-6,-7}}, CheckOption {
  41.                     NotSet, {24, 248, 40, 440},
  42.                     "Do Cross-reference",
  43.                     "-x",
  44.                     "Use #Included files if this option is checked."},
  45.             or  {{1}}, CheckOption {
  46.                     NotSet, {40, 248, 56, 440},
  47.                     "Enable file inclusion",
  48.                     "-i",
  49.                     "Use #Included files if this option is checked."},
  50.                                     
  51.             or  {{1}}, CheckOption {
  52.                     NotSet, {56, 248, 72, 440},
  53.                     "Generate listing only",
  54.                     "-l",
  55.                     "List documents with global and local line numbers."},
  56.  
  57.             or  {{1}}, CheckOption {
  58.                     NotSet, {72, 248, 88, 440},
  59.                     "Cross-ref reserved words",
  60.                     "-r",
  61.                     "Cross-reference C reserved words"},
  62.  
  63.             and  {{-1,-2,-3, -4}}, CheckOption {
  64.                     NotSet, {40, 24, 56, 216},
  65.                     "List Macros",
  66.                     "-m",
  67.                     "List Macros with functions."},
  68.  
  69.             and  {{-1,-2,-3, -4}}, CheckOption {
  70.                     NotSet, {56, 24, 72, 216},
  71.                     "List Files and Lines",
  72.                     "-f",
  73.                     "List function position by Files and Lines."},
  74.  
  75.             and  {{-1,-2,-3, -4}}, CheckOption {
  76.                     NotSet, {72, 24, 88, 216},
  77.                     "List pages",
  78.                     "-p",
  79.                     "List functions position by Files, Lines, and pages."},
  80.  
  81.             notDependent {}, TextBox {
  82.                 gray,
  83.                 {17, 240, 90, 450},
  84.                 "Cross-reference Options"
  85.             },
  86.             notDependent {}, MultiFiles {
  87.                 "Input Files…",
  88.                 "Select the files to reference.  If no files are specified, usage is displayed.",
  89.                 {16, 24, 32, 120},
  90.                 "Files to reference:",
  91.                 "",
  92.                 MultiInputFiles {
  93.                     {TEXT},
  94.                     FilterTypes,
  95.                     "Only text files",
  96.                     "All files",
  97.                 }
  98.             },
  99.             Or {{-3}}, Redirection {
  100.                 StandardInput,
  101.                 {125, 30}
  102.             },
  103.             notDependent {}, Redirection {
  104.                 StandardOutput,
  105.                 {125, 180}
  106.             },
  107.             notDependent {}, Redirection {
  108.                 DiagnosticOutput,
  109.                 {125, 330}
  110.             },
  111.             notDependent {}, TextBox {
  112.                 gray,
  113.                 {120, 25, 165, 450},
  114.                 "Redirection"
  115.             },
  116.         }
  117.     }
  118. };
  119.